<?php echo $this->render('header.phtml'); ?>
<h2><?php echo $this->escape($this->content_title);?></h2>
<style type="text/css">
table { color: #333333;font-family: Arial,Helvetica,sans-serif; font-size: 12px; border:1px solid #D2D2D2; empty-cells: show; }
table.update_table td,table.update_table th { border-bottom:1px solid #D2D2D2; border-right:1px solid #D2D2D2; text-align: center; }
table.update_table tr {vertical-align: top; height: 21px; }
</style>


<?php 
echo '<table cellpadding="2" cellspacing="2" class="update_table"> ';
echo '<tr style="background-color: #E2E2E2;">';
echo '<th>Students</th>';
foreach($this->lessons as $l)
{
    echo '<th><a href="/attendance/index/lesson/'.$l->id.'">'.$l->start_date.'<br>'.substr($l->start_time,0,5).'</a></th>';
}
echo '</tr>';
foreach($this->users as $u)
{
    echo '<tr>';
    echo '<td align="left" style="text-align: left !important;">'.$u->first_name.' '.$u->last_name.'</td>';
    foreach($this->lessons as $l)
    {
        echo '<td>';
        if(isset($this->links[$l->start_date.' '.$l->start_time][$u->id])) echo '<img src="/public/images/checked.gif">' ;
        echo '</td>';
    }
    echo '</tr>';
}
echo '</table>';
?>
<?php echo $this->render('footer.phtml'); ?>